<template>
  <div>
    <img alt="Vue logo" src="./assets/logo.png" />
    <!-- <HelloWorld msg="Hello Vue 3 + TypeScript + Vite" /> -->
    <p>
      <!--使用 router-link 组件进行导航 -->
      <!--通过传递 `to` 来指定链接 -->
      <!--`<router-link>` 将呈现一个带有正确 `href` 属性的 `<a>` 标签-->
      <span class="link-wrapper">
        <router-link to="/">Go to Home</router-link>
      </span>
      <span class="link-wrapper">
        <router-link to="/vuex">Go to vuex</router-link>
      </span>
      <span class="link-wrapper">
        <router-link to="/axios">Go to Axios</router-link>
      </span>
    </p>
    <Counter />
    <!-- 路由出口 -->
    <!-- 路由匹配到的组件将渲染在这里 -->
    <router-view></router-view>
  </div>
</template>

<script lang="ts">
import { defineComponent } from 'vue'
import Counter from './components/Counter.vue'

export default defineComponent({
  name: 'App',
  components: {
    Counter
  }
})
</script>

<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
.link-wrapper {
  margin: 5px 15px;
}
</style>
